
<%@page import="util.Utilities"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>후기 리스트</title>

</head>
<body>
<c:forEach items="${requestScope.ldto.list }" var="ldto">
	<table border="1">
<tr>
<td width="100"><img src="/${initParam.context_root }/member_picture/${ldto.picture_filename}" width="100" ></td>
<td rowspan="4" width="700">${ldto.postScript_content }</td>
</tr>
<tr>
<td>${ldto.postScript_memberid}
</td>
</tr>
<tr>
<td><%=Utilities.changeDayFormat("${ldto.postScript_writedate}") %></td>
</tr>
<tr>
<td>
<c:choose>
	<c:when test="${ldto.postScript_score == 1}">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/whitestar.png">
		<img src="/${initParam.context_root }/img/whitestar.png">
		<img src="/${initParam.context_root }/img/whitestar.png">
		<img src="/${initParam.context_root }/img/whitestar.png">	
	</c:when>
	<c:when test="${ldto.postScript_score == 2}">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/whitestar.png">
		<img src="/${initParam.context_root }/img/whitestar.png">
		<img src="/${initParam.context_root }/img/whitestar.png">	
	</c:when>
	<c:when test="${ldto.postScript_score == 3}">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/whitestar.png">
		<img src="/${initParam.context_root }/img/whitestar.png">	
	</c:when>
	<c:when test="${ldto.postScript_score == 4}">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/whitestar.png">	
	</c:when>
	<c:when test="${ldto.postScript_score == 5}">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">
		<img src="/${initParam.context_root }/img/goldstar.jpg">	
	</c:when>
</c:choose>
</td>
</tr>
</table>
<c:choose>
	<c:when test='${sessionScope.login_info.member_id != ldto.postScript_memberid}'>
	  
	</c:when>
	
	<c:otherwise> 	
 		<a href="/${initParam.context_root }/delete.do?no=${ldto.postScript_no}">글삭제하기</a><br>
		<a href="/${initParam.context_root }/modifyForm.do?no=${ldto.postScript_no}">수정하기</a><br>
 	</c:otherwise>
 </c:choose>
</c:forEach>
<c:choose>
			<c:when test="${requestScope.ldto.pagingDTO.previousPageGroup }">
				<a href="page.do?page=${requestScope.ldto.pagingDTO.startPageOfPageGroup -1 }">
				◀
				</a>
			</c:when>
			<c:otherwise>
				◀
			</c:otherwise>
		</c:choose>
		<c:forEach begin="${requestScope.ldto.pagingDTO.startPageOfPageGroup }"
							   end="${requestScope.ldto.pagingDTO.endPageOfPageGroup }"
							   step="1"
							   var ="i">
			<c:choose>
				<c:when test="${i == requestScope.ldto.pagingDTO.currentPage }">
					${i }
				</c:when>
				<c:otherwise>
					<a href="page.do?page=${i }">${i }</a>
				</c:otherwise>
			</c:choose>			
		</c:forEach>
		<c:choose>
			<c:when test="${requestScope.ldto.pagingDTO.nextPageGroup }">
				<a href="page.do?page=${requestScope.ldto.pagingDTO.endPageOfPageGroup + 1 }">
					▶
				</a>
			</c:when>
			<c:otherwise>
				▶
			</c:otherwise>
		</c:choose>
</body>
</html>	
